package com.tiger.transaction.sample1;

import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

public class Sample1Client {
	public static void main(String args[]) {
		try {
			InitialContext ctx = new InitialContext();
			Object obj = ctx.lookup("comp/env/ejb/Sample1Bean");
			Sample1Home sample1Home = (Sample1Home) PortableRemoteObject.narrow(obj, Sample1Home.class);
			Sample1 sample1 = sample1Home.create();
			sample1.test();
			sample1.remove();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
